package com.itqf.proxy.dynimic_proxy2;

import com.itqf.proxy.dynimic_proxy2.factory.MyServiceProxyFactory;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/9/28
 * @Time: 下午5:33
 */
public class TestServiceProxy {
    public  static  void  main(String[]args){

        //被代理对象  未加事务
       // ProductService productService = new ProductServiceImpl();
        ///得到代理对象
        ProductService productService = MyServiceProxyFactory.createProxyService();

        productService.addProduct();;
        int i = productService.deleteProduct(1+"");
        System.out.println(i);
        productService.updateProduct();

        System.out.println(TestServiceProxy.class.getClassLoader());
    }

}
